home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
BBS Toolkit
/
BBS Toolkit.iso
/
rbbs_pc
/
173bmrg.zip
/
CSUB1028.MRG
< prev
next >
Wrap
Text File
|
1990-10-28
|
14KB
|
304 lines
* ------------[ BLED merge (c) Ken Goosens ]-------------
* Merge this against 17.3A\CNFG-SUB.BAS to produce 17.3B\CNFG-SUB.BAS
* 17.3A\CNFG-SUB.BAS: Date 8-26-1990 Size 103388 bytes
* ------------[ Created 10-28-1990 12:00:01 ]------------
* REPLACING old line(s) by new
' $linesize:132
* ------[ first line different ]------
' $title: 'CNFG-SUB.BAS 17.3B, Copyright 1987-90 by D. Thomas Mack' ' KG102201
' Copyright 1990 by D. Thomas Mack, all rights reserved.
' Name ...............: CNFG-SUB.BAS
' First Released .....: February 11, 1990
' Subsequent Releases.: August 26, 1990, October 28, 1990
' Copyright ..........: 1987-90
' Purpose.............: The Remote Bulletin Board System for the IBM PC,
' RBBS-PC, configuration program -- CONFIG.BAS
' utilizes a lot of menus and string space.
' These are incorporated within CNFG-SUB.BAS as a
' seperately callable subroutines in order to free
' up as much code as possible within the 64K code
' segment used by CONFIG.BAS.
' Parameters..........: Most parameters are passed via a COMMON statement.
'
' Subroutine Line Function of Subroutine
' Name Number
' ALLCAPS 61212+ Captialize a string
' ANSIDECODE 62040+ Convert ANSI strings into english text expressions
' ANYINTEGER 61450 Prompt for any integer
' ANYNUMBER 61400 Prompt for any number
' ASKRO 61100 Ask a question on a specific row
' ASKUPOS 61300 Ask for identifying field in USERS record
' BRKFNAME 61830 Break file name in drive/path, prefix, extension
' CHKFMSDIR 61700 Check FMS directory for valid structure
' CHKPERSDIR 61755 Check Personal directory format
' CNFGINIT 60385 Initialize CONFIG's constants
' COLORCODE 62040+ Convert response into ANSI-meaningful strings
' DISPLAY 12190 Display the CONFIG menu pages
' FINDFILE 61600 Determine whether a file exists
' FINDLAST 61850 Find last occurence of a character in a string
' GETANSI 62000 Prompt for ANSI colors to be used
' GETASCII 61810 Get any character by character or ascii value
' GETCOLOR 61950 Process request for setting color
' GETINIT 61110 Get answers that are integers
' GETNUMYN 61150 Get TRUE/FALSE answer to a YES/NO question
' GETYESNO 61200 Ask a question with a "yes" or "no" response
' HANDERR 61775+ Handle error checking for FMS directories
' MMINTEGER 61500 Prompt for integer with min and a max
' NETTYPE 60382 Prompt for supported network types
' REMOVE 61800 Remove characters from a string
' SECURE 61860 Allow commands and their security level to be changed
' SELMODEM 62100 Select modem to set modem strings
' TRIMTRAIL 61840 Remove trailing characters from a string
'
' $INCLUDE: 'CNFG-VAR.BAS'
'
' $SUBTITLE: 'DISPLAY - subroutine to display CONFIG's menus'
' $PAGE
'
' SUBROUTINE NAME -- DISPLAY
'
' INPUT PARAMETERS -- PARAMETER DESCRIPTION
' IX = 0 DISPLAY THE CHOICE OF MENUS
' IX = -1 RE-READ THE INPUT (INVALID REQUEST)
' IX > 0 DISPLAY THE APPROPRIATE PAGE
'
' OUTPUT PARAMETERS -- HJ$ OPTION SELECTED
' IPAGE MENU PAGE CONTAINING OPTION
' ILOOKUP INDEX (1 TO 20) OF OPTION SELECTED
'
' SUBROUTINE PURPOSE -- TO DISPLAY CONFIG'S MENUS AND REQUEST OPTION
'
SUB DISPLAY STATIC
'
' * DISPLAY CONFIG'S MAIN FUNCTION KEY MENU
'
IF IX > 0 THEN _
GOTO 12320
IF IX = -1 THEN _
GOTO 12590
* REPLACING old line(s) by new
60385 SUB CNFGINIT STATIC
'
' * INITALIZE ALL VARIABLES IF A .DEF FILE DOESN'T AREADY EXIST
'
D$ = DD$
DRV$ = LEFT$(D$,1)
FALSE = 0
TRUE = NOT FALSE
SYSOP.SECURITY.LEVEL = 10
ACT.MNTHS.B4.DELETING = 1
ACTIVE.BULLETINS = 6
ADD.DIR.SECURITY = SYSOP.SECURITY.LEVEL
ALLOW.CALLER.TURBO = 6
ALTDIR.EXTENSION$ = ""
ALWAYS.STREW.TO$ = ""
ANS.MENU$ = D$ + "MENUA"
ASK.EXTENDED.DESC = SYSOP.SECURITY.LEVEL
ASK.IDENTITY = FALSE
AUTO.ADD.SECURITY = 5
AUTO.UPGRADE.SEC = SYSOP.SECURITY.LEVEL
AUTOPAGE.DEF$ = D$ + "AUTOPAGE.DEF"
BG = 0
BORDER = 0
BUFFER.SIZE = 128
BULLETIN.MENU$ = "BULLET"
BULLETIN.PREFIX$ = "BULLET"
BULLETINS.OPTIONAL = TRUE
C$ = ""
CALLER.BKGRD = 0
CALLERS.FILE$ = D$ + "CALLERS"
SEC.KILL.ANY = SYSOP.SECURITY.LEVEL
COM.PORT$ = "COM1"
COMMANDS.BETWEEN.RINGS = FALSE
COMMANDS.IN.PROMPT = TRUE
COMMENTS.AS.MESSAGES = FALSE
COMMENTS.FILE$ = D$ + "COMMENTS"
COMPRESSED.EXT$ = ".ARC.PAK"
COMPUTER.TYPE = 0
CONFERENCE.MENU$ = D$ + "CONFENCE"
CONFERENCE.VIEWER.SEC.LVL = 0
CONFMAIL.LIST$ = D$ + "CONFMAIL.DEF"
* ------[ first line different ]------
CONFIG.VERSION$ = "Version 17.3B" ' KG102201
DEFAULT.CATEGORY.CODE$ = "UNC"
DAYS.IN.SUBSCRIPTION.PERIOD = 365
DAYS.TO.WARN = 60
DIR.CATEGORY.FILE$ = D$ + "DIR.CAT"
DIRECTORY.PREFIX$ = "DIR"
DEFAULT.ECHOER$ = "R"
DEFAULT.LINE.ACK$ = ""
DEFAULT.SECURITY.LEVEL = 5
DIRECTORY.EXTENTION$ = "DIR"
DIRECTORY.PATH$ = D$
DISK.FOR.DOS$ = D$
DISKFULL.GO.OFFLINE = TRUE
DNLD.SUB = 0
DOORS.AVAILABLE = FALSE
DOORS.DEF$ = D$ + "DOORS.DEF"
DOORS.TERMINAL.TYPE = 8
DOSANSI = FALSE
DOS.VERSION = 2
DOWNLOAD.DRIVES$ = DRV$ + DRV$
DOWNLOAD.TO.SUBDIR = FALSE
DRIVE.FOR.BULLETINS$ = D$
DRIVE.FOR.HELP.FILES$ = D$
DTR.DROP.DELAY = 3
DUMB.MODEM = FALSE
ECHOER$ = "R"
EMPHASIZE.OFF.DEF$ = "[27]" + "[0;40;33m"
EMPHASIZE.ON.DEF$ = "[27]" + "[1;41;37m"
END.OFFICE.HOURS = 2200
ENFORCE.UPLOAD.DOWNLOAD.RATIOS = FALSE
EPILOG$ = D$ + "EPILOG.DEF"
ESCAPE.INSECURE = FALSE
EXPERT.USER = 0
EXPIRED.SECURITY = DEFAULT.SECURITY.LEVEL
EXTENDED.LOGGING = FALSE
EXTENSION.LIST$ = "ZIP"
FAST.FILE.LIST$ = D$ + "FIDX.DEF"
FAST.FILE.LOCATOR$ = D$ + "LIDX.DEF"
FC = 5
FG = 7
FG.1.DEF$ = "Bright Green"
FG.2.DEF$ = "Bright Yellow"
FG.3.DEF$ = "Bright Purple"
FG.4.DEF$ = "Bright Cyan"
FILE.COMMANDS.DEFAULTS$ = "DGLNPSUV"
FILE.COMMANDS$ = FILE.COMMANDS.DEFAULTS$
FILE.NOTIFY = FALSE
FILES.FUNCTION$(1,1) = "D)ownload a file "
FILES.FUNCTION$(2,1) = "G)oodbye "
FILES.FUNCTION$(3,1) = "L)ist file directory "
FILES.FUNCTION$(4,1) = "N)ew file search "
FILES.FUNCTION$(5,1) = "P)ersonal files "
FILES.FUNCTION$(6,1) = "S)earch files "
FILES.FUNCTION$(7,1) = "U)pload a file "
FILES.FUNCTION$(8,1) = "V)erbose archive list "
FILES.FUNCTION$(1,2) = "D"
FILES.FUNCTION$(2,2) = "G"
FILES.FUNCTION$(3,2) = "L"
FILES.FUNCTION$(4,2) = "N"
FILES.FUNCTION$(5,2) = "P"
FILES.FUNCTION$(6,2) = "S"
FILES.FUNCTION$(7,2) = "U"
FILES.FUNCTION$(8,2) = "V"
FILESEC.FILE$ = D$ + "FILESEC"
FIRST.NAME.PROMPT$ = "FIRST name"
FOSSIL = 0
GB = FC
GLOBAL.COMMANDS.DEFAULTS$ = "H?QX"
GLOBAL.COMMANDS$ = GLOBAL.COMMANDS.DEFAULTS$
GLOBAL.FUNCTION$(1,1) = "H)elp on-line "
GLOBAL.FUNCTION$(2,1) = "?)help on-line (=H) "
GLOBAL.FUNCTION$(3,1) = "Q)uit this part "
GLOBAL.FUNCTION$(4,1) = "X)Expert toggle on/off "
GLOBAL.FUNCTION$(1,2) = "H"
GLOBAL.FUNCTION$(2,2) = "?"
GLOBAL.FUNCTION$(3,2) = "Q"
GLOBAL.FUNCTION$(4,2) = "X"
GO.TO.SHELL = TRUE
HELP$(3) = "HELP03"
HELP$(4) = "HELP04"
HELP$(7) = "HELP07"
HELP$(9) = "HELP09"
HELP.EXTENSION$ = "HLP"
HELP.FILE.PREFIX$ = "HELP0"
HELP.PATH$ = D$
HOST.ECHO.OFF$ = ""
HOST.ECHO.ON$ = ""
IB = 0
KEEP.INIT.BAUD = FALSE
KEEP.TIME.CREDITS = FALSE
LAST.NAME.PROMPT$ = "LAST name"
LEN.HASH = 31
LEN.INDIV = 0
LIBRARY.ARCHIVE.PATH$ = D$
LIBRARY.ARCHIVE.PROGRAM$ = "ARCA "
LIBRARY.COMMANDS.DEFAULTS$ = "ACDGLSV"
LIBRARY.COMMANDS$ = LIBRARY.COMMANDS.DEFAULTS$
LIBRARY.DRIVE$ = ""
LIBRARY.MAX.DISK = 705
LIBRARY.MAX.DIRECTORY = 7
LIBRARY.MAX.SUBDIR = 100
LIBRARY.SUBDIR.PREFIX$ = "DISK"
LIBRARY.DIRECTORY.PATH$ = D$
LIBRARY.DIRECTORY.EXTENTION$ = "CDR"
LIBRARY.FUNCTION$(1,1) = "A)rchive a Library disk "
LIBRARY.FUNCTION$(2,1) = "C)hange Library disk "
LIBRARY.FUNCTION$(3,1) = "D)ownload a file "
LIBRARY.FUNCTION$(4,1) = "G)oodbye "
LIBRARY.FUNCTION$(5,1) = "L)ist a file directory "
LIBRARY.FUNCTION$(6,1) = "S)earch files "
LIBRARY.FUNCTION$(7,1) = "V)erbose archive list "
LIBRARY.FUNCTION$(1,2) = "A"
LIBRARY.FUNCTION$(2,2) = "C"
LIBRARY.FUNCTION$(3,2) = "D"
LIBRARY.FUNCTION$(4,2) = "G"
LIBRARY.FUNCTION$(5,2) = "L"
LIBRARY.FUNCTION$(6,2) = "S"
LIBRARY.FUNCTION$(7,2) = "V"
LIBRARY.WORK.DISK.PATH$ = D$
LIMIT.SEARCH.TO.FMS = FALSE
LOGON.MAIL.LEVEL$ = "A"
LSB = 1016
* REPLACING old line(s) by new
61755 SUB CHKPERSDIR (PDIR$, DESC.LEN, NAMELEN) STATIC
CLS
LOCATE 5, 21
PRINT "Checking Personal Directory "; PDIR$;
NLINES = 0
LOCATE 7, 27
PRINT "Line #";
LOCATE 9, 20
COLOR 0, 7
PRINT " Last Line with an ERROR ";
LOCATE 12, 28
PRINT " Last ERROR ";
COLOR 7, 0
GO.ON = -1
CALL FINDFILE(PDIR$, FEXISTS)
IF NOT FEXISTS THEN _
LOCATE 6, 25: _
PRINT "File not found"; : _
GOTO 61775
LINELEN = 34 + DESC.LEN + NAMELEN
OPEN PDIR$ FOR INPUT AS #2
WHILE NOT EOF(2) AND GO.ON
NLINES = NLINES + 1
LINE INPUT #2, A$
L = LEN(A$)
LOCATE 7, 36
PRINT NLINES;
IF L > LINELEN THEN _
CALL HANDERR(A$, NLINES, "Too LONG: has" + STR$(L) + " chars but should have" + STR$(LINELEN), GO.ON) : _
IF NOT GO.ON THEN _
GOTO 61770
IF L < LINELEN THEN _
CALL HANDERR(A$, NLINES, "Too SHORT: has" + STR$(L) + " chars but should have" + STR$(LINELEN), GO.ON) : _
IF NOT GO.ON THEN _
GOTO 61770
* ------[ first line different ]------
IF L > 30 AND (LEFT$(A$,1) <> " ") THEN _ ' DA102101
X$ = MID$(A$, 24, 2) + MID$(A$, 27, 2) + MID$(A$, 30, 2) : _
I = 1 : _
WHILE I < 7 AND INSTR("0123456789", MID$(X$, I, 1)) > 0 : _
I = I + 1 : _
WEND : _
IF I < 7 THEN _
CALL HANDERR(A$, NLINES, "INVALID CHARACTER <" + MID$(X$, I, 1) + "> in date field", GO.ON) : _
IF NOT GO.ON THEN _
GOTO 61770
IF L = LINELEN THEN _
X$ = RIGHT$(A$, 1) : _
IF INSTR("*!", X$) = 0 THEN _
CALL HANDERR(A$, NLINES, "Last char on line should be * or ! but found <" + X$ + ">", GO.ON) : _
IF NOT GO.ON THEN _
GOTO 61770
IF L = LINELEN THEN _
X$ = MID$(A$, L - NAMELEN, LINELEN) : _
IF LEFT$(X$, 1) = " " THEN _
IF INSTR("0123456789-", MID$(X$, 2, 1)) = 0 THEN _
CALL HANDERR(A$, NLINES, "Name field at col" + STR$(L - NAMELEN) + " has <" + LEFT$(X$, 1) + ">, needs non-blank or blank+number", GO.ON) : _
IF NOT GO.ON THEN _
GOTO 61770